package edu.sctu.java.generic.method;

import java.lang.reflect.InvocationTargetException;

public class DemoClass {

    public <T> T getInstance(Class<T> t)
            throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        return t.getDeclaredConstructor().newInstance();
    }
}
